public static unsafe class UnsafeTool
{
    public static T* GetAddress<T>(in T obj) where T : unmanaged
    {
        fixed (T* ptr = &obj)
        {
            return ptr;
        }
    }
}